import Vue from 'vue';
import Tip1 from './tip1';
import Tip2 from './tip2';


export default {
  init() {
    if (!this.instance) {
      let tipClass = Vue.extend(Tip1);
      this.instance = new tipClass().$mount();
      document.body.appendChild(this.instance.$el);
    }
  },
  show(opt) {
    this.instance.show(opt)
  },
  close() {
    this.instance.close();
  },
  install(Vue) {
    this.init();
    Vue.prototype.$tip = this;
  }
}